package Commons.WebServiceClient;

import Commons.Logging.Log;
import globalmonitor.InviaNotificaWS;
import globalmonitor.InviaNotificaWSService;
import globalmonitor.Notifica;
import javax.xml.ws.WebServiceRef;

/**
 *
 * @author Team5
 * 
 */

public class WebServiceClient  implements Runnable{
    @WebServiceRef(wsdlLocation="http://192.168.1.4:8080/GlobalMonitor/InviaNotificaWSService?wsdl")
    InviaNotificaWSService service;

    Notifica notificaDaInviare;

    public WebServiceClient(Log log) {
        service = new InviaNotificaWSService();
        notificaDaInviare = log.marshal();
    }

    @Override
    public void run() {    
        InviaNotificaWS p = service.getInviaNotificaWSPort();
        p.add(notificaDaInviare);
    }

}